<template>
  <Layout>
    <a-card title="登录" class="login" style="width: 500px">
      <template #extra
        ><a-button type="primary" ghost @click="goRegister"
          >注册</a-button
        ></template
      >
      <LoginForm />
    </a-card>
  </Layout>
</template>

<script lang="ts">
import Layout from "@/layout/Home.vue";
import { defineComponent } from "vue";
import LoginForm from "@/components/forms/LoginForm.vue";
import router from "@/router";

export default defineComponent({
  name: "Login",
  components: {
    Layout,
    LoginForm,
  },
  setup() {
    const goRegister = () => {
      router.push({
        name: "Register",
      });
    };
    return { goRegister };
  },
});
</script>

<style lang="scss"></style>
